package com.iplant.ams.serviceImpl.dao.dms.maintenance;

import com.iplant.ams.service.po.dms.maintenance.DMSConfiguration;
import com.iplant.ams.service.po.dms.maintenance.DMSDeviceBOM;
import com.iplant.base.po.OutResult;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Slf4j
@DBBaseDAO(DMSConfiguration.class)
public class DMSConfigurationDAO extends BaseDAO {

    private static DMSConfigurationDAO Instance = null;

    private DMSConfigurationDAO() {
        super("");
        this.Init();
    }

    public static DMSConfigurationDAO getInstance() {
        if (Instance == null)
            Instance = new DMSConfigurationDAO();
        return Instance;
    }

    public List<DMSConfiguration> DMS_SelectDeviceConfigurationList(BMSEmployee wLoginUser, int wDeviceID, OutResult<Integer> wErrorCode){
        Map<String,Object> wParams= new HashMap<>();
        wParams.put("DeviceID", wDeviceID);
        wParams.put("Active", 1);
        return this.SelectPOList(wLoginUser, wParams , DMSConfiguration.class, wErrorCode);
    }

}
